using System.Collections.Generic;
using System.Threading.Tasks;

namespace Joy.Erp.Ufida.Pmc
{
    /// <summary>
    /// 需求订单缓存服务接口
    /// </summary>
    public interface IDemandOrderCacheService
    {
        /// <summary>
        /// 设置缓存
        /// </summary>
        Task SetCacheAsync(List<DemandOrderDto> demandOrders);

        /// <summary>
        /// 获取全部缓存
        /// </summary>
        Task<List<DemandOrderDto>> GetAllAsync();

        /// <summary>
        /// 获取分页数据
        /// </summary>
        Task<List<DemandOrderDto>> GetPagedListAsync(int skipCount, int maxResultCount);

        /// <summary>
        /// 获取总数
        /// </summary>
        Task<int> GetCountAsync();

        /// <summary>
        /// 更新单个需求订单
        /// </summary>
        Task<bool> UpdateAsync(string docNo, string docType, DemandOrderDto demandOrder);

        /// <summary>
        /// 清除缓存
        /// </summary>
        Task ClearAsync();

        /// <summary>
        /// 检查缓存是否存在
        /// </summary>
        Task<bool> ExistsAsync();
    }
}
